import 'package:flutter/material.dart';
import 'package:flutter_juwo/common/common_index.dart';
import 'package:flutter_juwo/ui/pages/personalCenterPages/ts/profit/profit_view.dart';

/// Created by DongKing on 2020/10/13
/// Version 1.0
/// Describe:收益统计
class Profit extends StatefulWidget {
  @override
  _ProfitState createState() => _ProfitState();
}

class _ProfitState extends State<Profit> {
  var data = [
    {
      "time": "2020-02-14 17:21",
      "type": "活动邀请收入",
      "account": "淘宝:奔跑的小鹿",
      "phone": "13052191937",
      "msg": "直接邀请",
      "money": "1.00"
    },
    {
      "time": "2020-02-14 17:21",
      "type": "活动邀请收入",
      "account": "淘宝:奔跑的小鹿",
      "phone": "13052191937",
      "msg": "直接邀请",
      "money": "1.00"
    },
    {
      "time": "2020-02-14 17:21",
      "type": "活动邀请收入",
      "account": "淘宝:奔跑的小鹿",
      "phone": "13052191937",
      "msg": "直接邀请",
      "money": "1.00"
    },
    {
      "time": "2020-02-14 17:21",
      "type": "活动邀请收入",
      "account": "淘宝:奔跑的小鹿",
      "phone": "13052191937",
      "msg": "直接邀请",
      "money": "1.00"
    },
    {
      "time": "2020-02-14 17:21",
      "type": "活动邀请收入",
      "account": "淘宝:奔跑的小鹿",
      "phone": "13052191937",
      "msg": "直接邀请",
      "money": "1.00"
    }
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colours.cbg1,
      appBar: UiUtils.appHomeBar(context, "收益统计"),
      body: _body(),
    );
  }

  _body() {
    return Column(
      children: <Widget>[
        ProfitView.profit(3821, 2101),
        ProfitView.flowList(data)
      ],
    );
  }
}
